package com.example.autooperation.service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.autooperation.entity.Log;
import com.example.autooperation.mapper.LogMapper;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;

@Service
public class LogService extends ServiceImpl<LogMapper, Log> {
    public void createLog(Integer taskId, String message, LocalDateTime timestamp) {
        Log log = new Log();
        log.setTaskId(taskId);
        log.setMessage(message);
        log.setTimestamp(timestamp);
        this.save(log);
    }
} 